package me.mcx.mcx.service.impl;

import java.util.List;
import me.mcx.common.utils.DateUtils;
import me.mcx.mcx.domain.McxRecruitment;
import me.mcx.mcx.mapper.McxRecruitmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import me.mcx.mcx.service.IMcxRecruitmentService;

/**
 * 招聘信息Service业务层处理
 * 
 * @author mcx
 * @date 2024-09-21
 */
@Service
public class McxRecruitmentServiceImpl implements IMcxRecruitmentService 
{
    @Autowired
    private McxRecruitmentMapper mcxRecruitmentMapper;

    /**
     * 查询招聘信息
     * 
     * @param id 招聘信息主键
     * @return 招聘信息
     */
    @Override
    public McxRecruitment selectMcxRecruitmentById(Long id)
    {
        return mcxRecruitmentMapper.selectMcxRecruitmentById(id);
    }

    /**
     * 查询招聘信息列表
     * 
     * @param mcxRecruitment 招聘信息
     * @return 招聘信息
     */
    @Override
    public List<McxRecruitment> selectMcxRecruitmentList(McxRecruitment mcxRecruitment)
    {
        return mcxRecruitmentMapper.selectMcxRecruitmentList(mcxRecruitment);
    }

    /**
     * 新增招聘信息
     * 
     * @param mcxRecruitment 招聘信息
     * @return 结果
     */
    @Override
    public int insertMcxRecruitment(McxRecruitment mcxRecruitment)
    {
        mcxRecruitment.setCreateTime(DateUtils.getNowDate());
        return mcxRecruitmentMapper.insertMcxRecruitment(mcxRecruitment);
    }

    /**
     * 修改招聘信息
     * 
     * @param mcxRecruitment 招聘信息
     * @return 结果
     */
    @Override
    public int updateMcxRecruitment(McxRecruitment mcxRecruitment)
    {
        mcxRecruitment.setUpdateTime(DateUtils.getNowDate());
        return mcxRecruitmentMapper.updateMcxRecruitment(mcxRecruitment);
    }

    /**
     * 批量删除招聘信息
     * 
     * @param ids 需要删除的招聘信息主键
     * @return 结果
     */
    @Override
    public int deleteMcxRecruitmentByIds(Long[] ids)
    {
        return mcxRecruitmentMapper.deleteMcxRecruitmentByIds(ids);
    }

    /**
     * 删除招聘信息信息
     * 
     * @param id 招聘信息主键
     * @return 结果
     */
    @Override
    public int deleteMcxRecruitmentById(Long id)
    {
        return mcxRecruitmentMapper.deleteMcxRecruitmentById(id);
    }
}
